import React from "react"; // 跨平台
import ReactDOM from "react-dom/client"; // 渲染和操作DOM
import "./index.css";
import App from "./day8/index";
import store from "./day7/store";

import { Provider } from "react-redux";

// import reportWebVitals from "./reportWebVitals";

// vue tempalte模板 template->html  -> 编译成render函数
// react jsx -> 可以写html结构的js -> 声明式 -> 编译成React.createElement函数
// const element = React.createElement("div", { class: "abc" }, {}); // 虚拟dom 命令式
// const elementJsx = <div className="abc">1</div>; //声明式
// app.mount('root')
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
    // 给根组件提供数据
    <Provider store={store}>
        <App></App>
    </Provider>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
// reportWebVitals();
